# 窗口管理
from Lib.base.keywords import KeyWords
from selenium.webdriver.common.by import By
from Lib.common.common_function import *
from Lib.base.page_object.login_page import LonginPage
import uuid
import random


class WindowManager(KeyWords):
    url = KeyWords.url + 'window-acceptance/list'

    def create_window_case(self):
        '''
        创建网格
        :return:
        '''
        data = get_data_by_yaml(get_path() + r'\Data\element_data\window_manager\create_case.yaml')
        element_operation(self, data[0]['data'])

    def window_case_list(self):
        '''
        创建网格
        :return:
        '''
        data = get_data_by_yaml(get_path() + r'\Data\element_data\window_manager\case_list.yaml')
        element_operation(self, data[0]['data'])


if __name__ == '__main__':
    driver = choose_browser()
    L = LonginPage(driver)
    L.login('kobeAdmin002', 'kobe8888')
    case = WindowManager(driver)
    case.window_case_list()
